<%@ Page Language="C#" MasterPageFile="~/Administration/main.master" AutoEventWireup="true"
    CodeFile="ProductReviews.aspx.cs" Inherits="Tathata.Web.Administration.Administration_ProductReviews" %>

<asp:Content ID="c1" ContentPlaceHolderID="cph1" runat="Server">
    <table cellpadding="4" width="100%" cellspacing="4" class="ibn-form">
        <tr class="ibn-WPHeader">
            <td align="left">
                <h4>
                    Product Reviews
                </h4>
            </td>
        </tr>
        <tr>
            <td class="text" width="100%">
                <asp:DataList runat="server" RepeatColumns="0" CellSpacing="4" ItemStyle-VerticalAlign="Top"
                    RepeatDirection="Vertical" DataKeyField="ProductReviewID" ID="dlProductReviews">
                    <ItemTemplate>
                        <b>
                            <%#Server.HtmlEncode(Eval("Title").ToString())%></b>
                        <br />
                        <%#Eval("CreatedOn")%>
                        <br />
                        <%#GetCustomerInfo (Convert.ToInt32(Eval("CustomerID")))%>
                        <br />
                        <b><a href="ProductDetails.aspx?ProductID=<%#Eval("ProductID")%>">
                            <%#Server.HtmlEncode(((Product)Eval("Product")).Name)%></a></b>
                        <br>
                        <asp:Button runat="server" ID="btnUpdateProductReview" CssClass="adminButton" CommandName="Update"
                            Text='<%# Convert.ToBoolean(Eval("IsApproved"))?"Disapprove" :"Approve"%>'></asp:Button>
                        <br />
                        <br />
                        <asp:Button runat="server" ID="btnEditProductReview" CssClass="adminButton" CommandName="Edit"
                            Text="Edit"></asp:Button>
                        <asp:Button runat="server" ID="btnDeleteProductReview" CssClass="adminButton" CommandName="Delete"
                            Text="Delete"></asp:Button>
                    </ItemTemplate>
                    <SeparatorTemplate>
                        <hr />
                    </SeparatorTemplate>
                </asp:DataList>
            </td>
        </tr>
    </table>
</asp:Content>
